/*
 * BatteryStatus.h
 *
 *  Created on: 2012-3-31
 *      Author: kylin
 */

#ifndef BATTERYSTATUS_H_
#define BATTERYSTATUS_H_

#include <QtNetwork>

#include "DeviceProtocol.h"

class BatteryQueryThread : public kthread
{
public:
	BatteryQueryThread(const QString& devNode,KjDeviceList* lstDevice,
			QObject* parent=0);
	virtual ~BatteryQueryThread();

protected:
	virtual void run();

private:
	QString m_devNode;
	KjDeviceList* m_lstDevice;
};

class BatteryStatusQuery : public DeviceProtocol
{
public:
	BatteryStatusQuery(quint32 id,const QString& devNode,
			KjDeviceList* lstDevice);
	virtual ~BatteryStatusQuery();

public:
	virtual bool start();
	virtual void stop();

	virtual void recycle(){}

private:
	BatteryQueryThread* m_processor;
};

#endif /* BATTERYSTATUS_H_ */
